'''
Created on Jul 16, 2009

@author: xin
@author: Mikael Rouson
'''
import numpy

def extend_sym(x, Nnum):
    y = numpy.hstack([numpy.fliplr(x[:, 1:Nnum + 1]), x, x[:, -1:-1 - Nnum:-1]])
    y = numpy.vstack([numpy.flipud(y[1:Nnum + 1, :]), y , y[-1:-1 - Nnum:-1, :]])
    return y
